import storage from "@/storage";

// 缓存
class Cache {
  getToken = (): string => {
    return storage.get("token") || "";
  };

  setToken = (value: string) => {
    storage.set("token", value);
  };

  getLanguage = (): string => {
    return storage.get("lang") || "zh-CN";
  };

  setLanguage = (value: string) => {
    storage.set("lang", value);
  };
}

export default new Cache();
